<%= form_for(@weight) do |f| %>
  <% if @weight.errors.any? %>
    <div id="error_explanation">
      <h2><%=@weight.errors.count%> <%=t('common.error')%> <%=t('message.error.weight.header')%></h2>

      <ul>
      <% @weight.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>
  <%= f.hidden_field :enabled%>
  <div class="margin-top10">
    <%= label_tag "weightAmountId", t('field.weight.weight'), :class => "form-label" %>
    <%= f.text_field :weight, :id => "weightAmountId", :class => "input-field weight-input-field" %>
    <%= label_tag "weightDateId", t('field.common.date'), :class => "form-label" %>
    <%= f.text_field :date, :id=> "weightDateId", :class => "input-field weight-input-field" %>
    <%= label_tag "weightTrenningId", t('field.weight.training'), :class => "form-label" %>
    <%= f.check_box :training, :class => "input-field training-input-field", :id=> "weightTrenningId" %>
  </div>
  <div class="actions form-buttons">
    <%= f.submit "", :class=>"save-button", :title=>t('button.save')%>
  </div>
<% end %>

<script type="text/javascript">
    jQuery(document).ready(function(){
        weightFormInit();
    });
</script>